<template>
	<view class="page" :style="themeColor">
		<view class="flex benben-position-layout flex flex-wrap align-center reasonForAccountCancellation_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub reasonForAccountCancellation_fd0_0'>
				<view class='flex flex-wrap align-center'>
					<person></person>
				</view>
				<view class='flex flex-wrap align-stretch justify-center flex-sub'>
					<text class='reasonForAccountCancellation_fd0_0_c1_c0'>注销账号</text>
				</view>
				<view class='flex flex-wrap align-center reasonForAccountCancellation_fd0_0_c2'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<view style="padding: 8rpx 32rpx;position: fixed;width: 100%;z-index: 5;background: #fff;">
			<back></back>
		</view>
		<!---注销账号原因-带图flex布局开始-->
		<view class="flex flex-direction flex-wrap align-stretch reasonForAccountCancellation_flex_1">
			<view class='flex reasonForAccountCancellation_fd1_0'>
				<image style="width: 34rpx;height: 36rpx;margin-right: 16rpx;transform: translateY(2rpx);" :src='STATIC_URL+"84.png"' mode="aspectFill"></image>
				<text class='reasonForAccountCancellation_fd1_0_c0'>账号注销</text>
			</view>
			<text class='reasonForAccountCancellation_fd1_1'>永久注销且无法恢复，请谨慎操作</text>
			<view class='flex flex-wrap align-center reasonForAccountCancellation_fd1_2'>
				<text class='reasonForAccountCancellation_fd1_0_c0'>请选择注销账号的原因：</text>
			</view>
			<benben-select-diy ref="showSelectPopup1681204058787"
				class-name='flex flex-direction align-stretch flex reasonForAccountCancellation_fd1_3'
				:items.sync="select_type" v-model="select_id" default-type="aid" default-label="name"
				:allow-cancel='false' type="radio" :disabled='false' @change="change">
				<template v-for='(item,key0) in select_type'>
					<view v-if="item.isSelected" class='flex flex reasonForAccountCancellation_fd1_0' :key="key0"
						@tap="$refs.showSelectPopup1681204058787.tapHandle(key0)">
						<image class='reasonForAccountCancellation_fd1_3_c0_c0' mode="aspectFit"
							:src='STATIC_URL+"1.png"'></image>
						<text class='reasonForAccountCancellation_fd1_3_c0_c1'>{{item.name}}</text>
					</view>
					<view v-else class='flex flex reasonForAccountCancellation_fd1_0' :key="key0"
						@tap="$refs.showSelectPopup1681204058787.tapHandle(key0)">
						<image class='reasonForAccountCancellation_fd1_3_c0_c0' mode="aspectFit"
							:src='STATIC_URL+"51.png"'></image>
						<text class='reasonForAccountCancellation_fd1_3_c1_c1'>{{item.name}}</text>
					</view>
				</template>
			</benben-select-diy>
			<template v-if="select_id == 3">
				<text class='reasonForAccountCancellation_fd1_4'>请填写注销原因</text>
				<view class='flex flex-wrap reasonForAccountCancellation_fd1_5'>
					<textarea class='flex reasonForAccountCancellation_input_fd1_5' confirm-type="done" :placeholder="'请输入'" :maxlength="240" placeholder-style="color:#999;font-size:28rpx" v-model="fd1_5" />
				
				</view>
			</template>
			
		</view>

		<!---注销账号原因-带图flex布局结束-->
		<view
			class="flex flex-wrap align-start justify-center benben-position-layout flex reasonForAccountCancellation_flex_2">
			<button class='reasonForAccountCancellation_fd2_0' @tap.stop="logOffFunc()">下一步</button>

		</view>
		<view :style="{height: '150rpx'}"></view>


	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	import back from "@/components/back/index.vue"
	import person from "@/components/person/index.vue"
	export default {
		components: {
			back,
			person
		},


		data() {
			return {
				"fd1_5": "",
				"select_id": "",
				"select_name": "",
				"select_type": [],
				"reasonForCancellation": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getzhuxiao()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//注销列表
			async getzhuxiao() {
				let res = await this.$api.post(global.apiUrls.a64367e6438da1, {});
				if (res.data.code != 1) {
					this.$message.info(res.data.msg)
					return
				}
				this.select_type = res.data.data;
				if (this.select_type.length > 0) {
					this.select_id = this.select_type[0].aid;
					this.select_name = this.select_type[0].name;
				}
			},
			change(e) {
				this.select_id = e.label;
				this.select_name = e.value;
			},
			//注销
			logOffFunc() {
				if (!this.select_id) return this.$message.info('请选择注销原因！');
				let content = "";
				if (this.select_id == 3) {
					if (!validate(this.fd1_5, 'require')) {
						this.$message.info('请填写注销原因');
						return false;
					}
					content = this.fd1_5;
				} else {
					content = this.select_name;
				}
				this.$urouter.navigateTo(
					`/pages/xtsz/accountCancellationRisk/accountCancellationRisk?type=${this.select_id}&content=${content}`
					);
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto !important;
	}

	.reasonForAccountCancellation_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.reasonForAccountCancellation_fd0_0_c2 {
		width: 32rpx;
		height: 32rpx;
	}

	.reasonForAccountCancellation_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.reasonForAccountCancellation_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.reasonForAccountCancellation_fd0_0 {
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.reasonForAccountCancellation_flex_1 {
		background: #fff;
		font-size: 32rpx;
		background-size: 100% auto !important;
		padding: 120rpx 32rpx 32rpx 32rpx;
	}

	.reasonForAccountCancellation_input_fd1_5 {
		border-bottom: 1px solid #eee;
		width: 100%;
		height: 100rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
	}

	.reasonForAccountCancellation_fd1_5 {
		width: 686rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		padding: 24rpx 24rpx 24rpx 24rpx;
	}

	.reasonForAccountCancellation_fd1_4 {
		font-size: 32rpx;
		font-weight: 400;
		color: #333333;
		margin: 32rpx 0rpx 32rpx 0rpx;
	}

	.reasonForAccountCancellation_fd1_3_c1_c1 {
		color: #333;
		font-size: 28rpx;
		font-weight: 500;
		line-height: 40rpx;
	}

	.reasonForAccountCancellation_fd1_3_c0_c1 {
		font-size: 28rpx;
		font-weight: 500;
		color: #333;
		line-height: 40rpx;
	}

	.reasonForAccountCancellation_fd1_3_c0_c0 {
		width: 36rpx;
		height: 36rpx;
		border-radius: 18rpx 18rpx 18rpx 18rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
	}

	::v-deep .reasonForAccountCancellation_fd1_3 {
		border-bottom: 1px solid #eee;
	}

	.reasonForAccountCancellation_fd1_2 {
		border-top: 1px solid #eee;
		padding: 32rpx 0rpx 12rpx 0rpx;
		margin: 32rpx 0rpx 0rpx 0rpx;
	}

	.reasonForAccountCancellation_fd1_1 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
	}

	.reasonForAccountCancellation_fd1_0_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: #333333;
	}

	.reasonForAccountCancellation_fd1_0 {
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.reasonForAccountCancellation_flex_2 {
		background: #fff;
		width: 750rpx;
		height: 150rpx;
		overflow: hidden;
		z-index: 5;
		bottom: calc(0rpx + var(--window-bottom));
		background-size: 100% auto !important;
	}

	.reasonForAccountCancellation_fd2_0 {
		background: var(--benbenbgColor2);
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		color: #fff;
		margin: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
		line-height: 88rpx;
		width: 640rpx;
	}
</style>